package com.zhangtai.modules.service.employee;

import com.zhangtai.modules.entity.employee.EmployeeInfoEntity;
import com.zhangtai.modules.entity.employee.EmployeeRecruitmentEntity;
import com.zhangtai.modules.vo.RegularVo;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;


/**
 * 招聘数据信息表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2021-04-07 09:56:12
 */

public interface EmployeeRecruitmentService {

    @GetMapping("/findEmployeeRecruitmentList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "name", required = false) String name,
                         @RequestParam(value = "orgname", required = false) List<Long> orgname,
                         @RequestParam(value = "unitname", required = false) List<Long> unitname,
                         @RequestParam(value = "jobname", required = false) List<Long> jobname,
                         @RequestParam(value = "status",required = false)List<Integer> status,
                         @RequestParam(value = "isEntryStatus", required = false) Integer isEntryStatus,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
                         @RequestParam(value = "orgIds") List<Long> orgIds,
                         @RequestParam(value = "socialTrainee", required = false) Integer socialTrainee ,
                         @RequestParam(value="isOffer",required = false)      Integer isOffer,
                         @RequestParam(value="isSendContract",required = false)      Integer isSendContract,
                         @RequestParam(value="userCode",required = false)      String  userCode);


    public PageResult<EmployeeRecruitmentEntity> getRegularListPage(@RequestBody RegularVo regularVo, List<Long> lineSystem,
                                                         List<Long> jobSystem, List<Long> orgIds,
                                                         List<Long> org, List<Long> unit, List<Long> job);

    public List<EmployeeRecruitmentEntity> getRegularList(@RequestBody RegularVo regularVo, List<Long> lineSystem,
                                                                    List<Long> jobSystem, List<Long> orgIds,
                                                                    List<Long> org, List<Long> unit, List<Long> job);

    @GetMapping("/infoEmployeeRecruitment")
    @ApiOperation(value = "根据id查找")
    EmployeeRecruitmentEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveEmployeeRecruitment")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody EmployeeRecruitmentEntity entity);

    @PostMapping("/updateEmployeeRecruitment")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody EmployeeRecruitmentEntity entity);

    @GetMapping("/deleteOneEmployeeRecruitment")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteEmployeeRecruitments")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

